import { useSelector, useDispatch } from 'react-redux';
export function useUser() {
  const permission = useSelector((state) => state.user.permission);
  let $dispatch = useDispatch();
  const setPermission = (permission) => {
    $dispatch({
      type: 'user/setPermission',
      value: permission,
    });
  };
  return { permission, setPermission };
}
